﻿{template 'header', 'member'}
<script type="text/javascript">c(3);</script>

<script type="text/javascript">
//文件下载

// 使用JS实现下载.jpg、.doc、.txt、.rar、.zip等文件的方法(参数 imgOrURL 为需要下载的图片的URL地址)
    // 使用该方法实现下载压缩文件时会有网页错误信息提示
    // .doc、.rar、.zip 文件可以直接通过文件地址下载，
    // 如：<a href="../Images/test.doc" >点击下载文件</a> <a href="../Images/test.zip" >点击下载文件</a>
    function saveImageAs(imgOrURL) {
        if (typeof imgOrURL == 'object')
            imgOrURL = imgOrURL.src;
        window.win = open (imgOrURL);
        setTimeout('win.document.execCommand("SaveAs")', 500);
    }
    // 使用JS实现下载.txt、.doc、.txt、.rar、.zip等文件的方法(参数 fileURL 为需要下载的图片的URL地址)
    // 使用该方法实现下载压缩文件时不会有网页错误信息，但是不能使用该方法下载.jpg图片文件
    // .doc、.rar、.zip 文件可以直接通过文件地址下载，
    // 如：<a href="../Images/test.doc" >点击下载文件</a> <a href="../Images/test.zip" >点击下载文件</a>
    function savetxt(fileURL){
        var fileURL=window.open 

(fileURL,"_blank","height=0,width=0,toolbar=no,menubar=no,scrollbars=no,resizable=on,location=no,status=no");
        fileURL.document.execCommand("SaveAs");
        fileURL.window.close();
        fileURL.close();
    }
    // 功能类似savetxt方法，但是下载时初始文件名为code.txt，而不是跟目标文件名相同
    function svcode(obj) { 
        var winname = window.open('', '_blank', 'height=1,width=1,top=200,left=300'); 
        winname.document.open('text/html', 'replace'); 
        winname.document.writeln(obj.value); 
        winname.document.execCommand('saveas','','code.txt'); 
        winname.close(); 
    }
    function namesubss(url){
	var funcs=new Object;
	var urls=url;
	if( urls.substr(urls.length-3)=='jpg' || urls.substr(urls.length-3)=='bmp' || urls.substr(urls.length-3)=='gif')
	{
	  funcs=saveImageAs(urls);
	}
	else 
	{
		if(urls.substr(urls.length-3)=='rar' || urls.substr(urls.length-3)=='zip')
		{
	  		funcs=savetxt(urls);
		}
		else
		{
	  		funcs=savetxt(urls);
		}
	}
	return funcs;
    }

</script>
<div class="menu">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="tab" id="add"><a href="content.php?action=add"><span>添加合同</span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="finish"><a href="content.php?action=finish"><span>完成交易<span class="px10">({$nums[5]})

</span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s3"><a href="content.php"><span>支付中<span class="px10"></span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s2"><a href="content.php?status=2"><span>申请中<span class="px10">({$nums[2]})</span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s1"><a href="content.php?status=1"><span>未通过<span class="px10">({$nums[1]})</span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s4"><a href="content.php?status=4"><span>已过期<span class="px10">({$nums[4]})</span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="ctlist"><a href="content.php?action=ctlist"><span>请求列表<span class="px10"></span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="paylist"><a href="content.php?action=paylist"><span>交易列表<span class="px10"></span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="down"><a href="content.php?action=down"><span>合同下载<span class="px10"></span></span></a></td>
</tr>
</table>
</div>
{if $action=='add'}
<form method="post" action="content.php" id="dform" onsubmit="return check();">
<input type="hidden" name="action" value="{$action}"/>
<table cellpadding="6" cellspacing="1" class="tb">
<tr>
<td class="tl"><span class="f_red">*</span> 合同名称</td>
<td class="tr"><input name="post[title]" type="text" id="title" size="40" /> {dstyle('post[style]')} <span id="dtitle" 

class="f_red"></span></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 交易公司</td>
<td class="tr">
<select name="post[authority]"  id="authority">
{loop $mbcontent $k $v}

  <option value="{$mbvalues[$k]}">{$mbcontent[$k]}</option>
{/loop}
</select>

<span id="dauthority" class="f_red"></span>
</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 金额</td>
<td class="tr"><input id="amount" style="IME-MODE: disabled;" onkeyup="this.value=this.value.replace(/\D/g,'')"  

onafterpaste="this.value=this.value.replace(/\D/g,'')" maxlength="10" size="40" name="post[amount]" type="text" 

value="{$amount}" /> <span id="damount" class="f_red"></span></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 启用日期</td>
<td class="tr">{dcalendar('post[fromtime]')} <span id="dpostfromtime" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">到期日期</td>
<td class="tr">{dcalendar('post[totime]')} 不设置表示永久有效</td>
</tr>

<!-- 文件上传 -->
<tr>
<td class="tl"><span class="f_red">*</span> 文件地址</td>
<td class="tr"><div style="float:left;"><input name="post[fileurl]" id="fileurl" type="text" size="60" 

value="{$fileurl}"/>&nbsp;&nbsp;</div><div style="width:34px;height:20px;float:left;"><span 

id="spanButtonPlaceHolder"></span></div><table cellspacing="0" style="display:none;">
<tr>
	<td>Files Queued:</td>
	<td id="tdFilesQueued"></td>
</tr>			
<tr>
	<td>Files Uploaded:</td>
	<td id="tdFilesUploaded"></td>
</tr>			
<tr>
	<td>Errors:</td>
	<td id="tdErrors"></td>
</tr>
<tr>
	<td>Current Speed:</td>
	<td id="tdCurrentSpeed"></td>
</tr>			
<tr>
	<td>Average Speed:</td>
	<td id="tdAverageSpeed"></td>
</tr>			
<tr>
	<td>Moving Average Speed:</td>
	<td id="tdMovingAverageSpeed"></td>
</tr>			
<tr>
	<td>Time Remaining</td>
	<td id="tdTimeRemaining"></td>
</tr>			
<tr>
	<td>Time Elapsed</td>
	<td id="tdTimeElapsed"></td>
</tr>
<tr>
	<td>Size Uploaded</td>
	<td id="tdSizeUploaded"></td>
</tr>			
<tr>
	<td>Progress Event Count</td>
	<td id="tdProgressEventCount"></td>
</tr>	
</table><div style="float:left;">&nbsp;&nbsp;<span onclick="if(Dd('fileurl').value) window.open(Dd('fileurl').value);" 

class="jt">[预览]</span>&nbsp;&nbsp;<span onclick="Dd('fileurl').value='';" class="jt">[删除]</span>&nbsp;&nbsp; 
<span class="f_gray">进度：<span id="tdPercentUploaded">0%</span></span> <span id="dfileurl" class="f_red"></span></div>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.speed.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/handlers_down.js"></script>
<script type="text/javascript">
	var swfu;
	/* window.onload = function() { */
		var settings = {
			flash_url : "{$MODULE[1][linkurl]}file/swfupload/swfupload.swf",
			upload_url: "{$MODULE[1][linkurl]}upload.php",
			post_params: {"from": "file", "width": "100", "height": "100", "swf_userid": "<?php echo 

$_userid;?>", "swf_username": "<?php echo $_username;?>", "swf_groupid": "<?php echo $_groupid;?>", "swf_auth": "<?php echo 

md5($_userid.$_username.$_groupid.DT_KEY.$DT_IP);?>", "swfupload": "1"},
			file_size_limit : "1000 MB",
			file_types : "*.*",
			/*file_types : "*.<?php echo str_replace('|', ';*.', $MOD['upload']);?>",*/
			/* file_upload_limit : 100, */
			file_upload_limit : 10,
			file_queue_limit : 0,

			debug: false,

			button_image_url: "{$MODULE[1][linkurl]}file/swfupload/upload2.png",
			button_width: "34",
			button_height: "20",
			button_placeholder_id: "spanButtonPlaceHolder",
			
			moving_average_history_size: 40,
			
			file_queued_handler : fileQueued,
			file_dialog_complete_handler: fileDialogComplete,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,
			
			custom_settings : {
				tdFilesQueued : document.getElementById("tdFilesQueued"),
				tdFilesUploaded : document.getElementById("tdFilesUploaded"),
				tdErrors : document.getElementById("tdErrors"),
				tdCurrentSpeed : document.getElementById("tdCurrentSpeed"),
				tdAverageSpeed : document.getElementById("tdAverageSpeed"),
				tdMovingAverageSpeed : document.getElementById("tdMovingAverageSpeed"),
				tdTimeRemaining : document.getElementById("tdTimeRemaining"),
				tdTimeElapsed : document.getElementById("tdTimeElapsed"),
				tdPercentUploaded : document.getElementById("tdPercentUploaded"),
				tdSizeUploaded : document.getElementById("tdSizeUploaded"),
				tdProgressEventCount : document.getElementById("tdProgressEventCount")
			}
		};
		swfu = new SWFUpload(settings);
	 /* }; */
</script></td>
</tr>
<!--END: 文件上传-->

<tr>
<td class="tl">合同介绍</td>
<td class="tr"><textarea name="post[content]" id="content" class="dsn"></textarea>
{deditor($moduleid, 'content', $group_editor, '98%', 300)}<span id="dcontent" class="f_red"></span>
</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 添加时间</td>
<td class="tr"><input type="text" size="21" name="post[addtime]" id="addtime" value="{$addtime}"/> <span class="f_gray">请

保持时间格式</span> <span id="daddtime" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">&nbsp;</td>
<td class="tr" height="50"><input type="submit" name="submit" value=" 确 定 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input 

type="reset" name="reset" value=" 重 置 " class="btn"/></td>
</tr>
</table>
</form>
{load('clear.js')}
<script type="text/javascript">s('content');m('add');</script>

{elseif $action=='edit' && $li=='read'}
<form method="post" action="content.php?action=edit&li=read&itemid={$itemid}" id="dform" onsubmit="return check2();">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="itemid" value="{$itemid}"/>
<input type="hidden" name="forward" value="{$forward}"/>
<input type="hidden" name="read" value="read"/>
<table cellpadding="6" cellspacing="1" class="tb">
{if $status==1 && $note}
<tr>
<td class="tl">未通过原因</td>
<td class="tr f_blue">{$note}</td>
</tr>
{/if}
<tr>
<td class="tl"> 合同名称</td>
<td class="tr">{$title}</td>
</tr>
<tr>
<td class="tl"> 交易公司</td>
<td class="tr">{$authority}</td>
</tr>
<tr>
<td class="tl"> 金额</td>
<td class="tr">{$amount}</td>
</tr>
<tr>
<td class="tl"> 合同介绍</td>
<td class="tr">{$content}</td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 启用日期</td>
<td class="tr">{dcalendar('post[fromtime]', $fromtime)} <span id="dpostfromtime" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">到期日期</td>
<td class="tr">{dcalendar('post[totime]', $totime)} 不设置表示永久有效</td>
</tr>

<!-- 文件上传 -->
<tr>
<td class="tl"> 确认合同</td>
<td class="tr"><div style="float:left;"><input name="post[fileurl]" id="fileurl" type="text" size="60" 

value="{$fileurl}"/>&nbsp;&nbsp;</div><div style="width:34px;height:20px;float:left;"><span 

id="spanButtonPlaceHolder"></span></div><table cellspacing="0" style="display:none;">
<tr>
	<td>Files Queued:</td>
	<td id="tdFilesQueued"></td>
</tr>			
<tr>
	<td>Files Uploaded:</td>
	<td id="tdFilesUploaded"></td>
</tr>			
<tr>
	<td>Errors:</td>
	<td id="tdErrors"></td>
</tr>
<tr>
	<td>Current Speed:</td>
	<td id="tdCurrentSpeed"></td>
</tr>			
<tr>
	<td>Average Speed:</td>
	<td id="tdAverageSpeed"></td>
</tr>			
<tr>
	<td>Moving Average Speed:</td>
	<td id="tdMovingAverageSpeed"></td>
</tr>			
<tr>
	<td>Time Remaining</td>
	<td id="tdTimeRemaining"></td>
</tr>			
<tr>
	<td>Time Elapsed</td>
	<td id="tdTimeElapsed"></td>
</tr>
<tr>
	<td>Size Uploaded</td>
	<td id="tdSizeUploaded"></td>
</tr>			
<tr>
	<td>Progress Event Count</td>
	<td id="tdProgressEventCount"></td>
</tr>	
</table><div style="float:left;">&nbsp;&nbsp;<span onclick="if(Dd('fileurl').value) window.open(Dd('fileurl').value);" 

class="jt">[预览]</span>&nbsp;&nbsp;<span onclick="Dd('fileurl').value='';" class="jt">[删除]</span>&nbsp;&nbsp; 
<span class="f_gray">进度：<span id="tdPercentUploaded">0%</span></span> <span id="dfileurl" class="f_red"></span></div>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.speed.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/handlers_down.js"></script>
<script type="text/javascript">
	var swfu;
	/* window.onload = function() { */
		var settings = {
			flash_url : "{$MODULE[1][linkurl]}file/swfupload/swfupload.swf",
			upload_url: "{$MODULE[1][linkurl]}upload.php",
			post_params: {"from": "file", "width": "100", "height": "100", "swf_userid": "<?php echo 

$_userid;?>", "swf_username": "<?php echo $_username;?>", "swf_groupid": "<?php echo $_groupid;?>", "swf_auth": "<?php echo 

md5($_userid.$_username.$_groupid.DT_KEY.$DT_IP);?>", "swfupload": "1"},
			file_size_limit : "1000 MB",
			file_types : "*.*",
			/*file_types : "*.<?php echo str_replace('|', ';*.', $MOD['upload']);?>",*/
			/* file_upload_limit : 100, */
			file_upload_limit : 10,
			file_queue_limit : 0,

			debug: false,

			button_image_url: "{$MODULE[1][linkurl]}file/swfupload/upload2.png",
			button_width: "34",
			button_height: "20",
			button_placeholder_id: "spanButtonPlaceHolder",
			
			moving_average_history_size: 40,
			
			file_queued_handler : fileQueued,
			file_dialog_complete_handler: fileDialogComplete,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,
			
			custom_settings : {
				tdFilesQueued : document.getElementById("tdFilesQueued"),
				tdFilesUploaded : document.getElementById("tdFilesUploaded"),
				tdErrors : document.getElementById("tdErrors"),
				tdCurrentSpeed : document.getElementById("tdCurrentSpeed"),
				tdAverageSpeed : document.getElementById("tdAverageSpeed"),
				tdMovingAverageSpeed : document.getElementById("tdMovingAverageSpeed"),
				tdTimeRemaining : document.getElementById("tdTimeRemaining"),
				tdTimeElapsed : document.getElementById("tdTimeElapsed"),
				tdPercentUploaded : document.getElementById("tdPercentUploaded"),
				tdSizeUploaded : document.getElementById("tdSizeUploaded"),
				tdProgressEventCount : document.getElementById("tdProgressEventCount")
			}
		};
		swfu = new SWFUpload(settings);
	 /* }; */
</script></td>
</tr>
<!--END: 文件上传-->

<tr>
<td class="tl"> 备注</td>
<td class="tr"><textarea name="post[notes]" id="notes" cols ="50" rows = "6"></textarea></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 添加时间</td>
<td class="tr"><input type="text" size="21" name="post[addtime]" id="addtime" value="{$addtime}"/> <span class="f_gray">请

保持时间格式</span> <span id="daddtime" class="f_red"></span></td>
</tr>
<tr>
<td class="tl"><span class="f_hid">*</span> 合同状态</td>
<td>

<input type="radio" name="post[statusct]" value="3" <?php if($status == 3) echo 'checked';?> id="status_3"/><label 

for="status_3"> 通过</label>
<input type="radio" name="post[statusct]" value="2" <?php if($status == 2) echo 'checked';?> id="status_2"/><label 

for="status_2">  申请中</label>
<input type="radio" name="post[statusct]" value="1" <?php if($status == 1) echo 'checked';?> id="status_1"/><label 

for="status_1">  拒绝</label>

</td>
</tr>
<tr>
<td class="tl">&nbsp;</td>
<td class="tr" height="50"><input type="submit" name="submit" value=" 修 改 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input 

type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
</tr>
</table>
</form>
{load('clear.js')}
<script type="text/javascript">s('content');m('ctlist');</script>

{elseif $action=='edit'}
<form method="post" action="content.php" id="dform" onsubmit="return check();">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="itemid" value="{$itemid}"/>
<input type="hidden" name="forward" value="{$forward}"/>
<table cellpadding="6" cellspacing="1" class="tb">

{if $status==1 && $note}
<tr>
<td class="tl">未通过原因</td>
<td class="tr f_blue">{$note}</td>
</tr>
{/if}
<tr>
<td class="tl"><span class="f_red">*</span> 合同名称</td>
<td class="tr"><input name="post[title]" type="text" id="title" size="40" value="{$title}"/>  {dstyle('post[style]', 

$style)} <span id="dtitle" class="f_red"></span></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 交易公司</td>
<td class="tr">
<select name="post[authority]"  id="authority">
{loop $mbcontent $k $v}

  <option value="{$mbvalues[$k]}" {if $mbcontent[$k]==$authority} selected="selected" {/if}>{$mbcontent[$k]}</option>
{/loop}
</select>
<span id="dauthority" class="f_red"></span>
</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 金额</td>
<td class="tr"><input id="amount" style="IME-MODE: disabled;" onkeyup="this.value=this.value.replace(/\D/g,'')"  

onafterpaste="this.value=this.value.replace(/\D/g,'')" maxlength="10" size="40" name="post[amount]" type="text" 

value="{$amount}" /> <span id="damount" class="f_red"></span></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 启用日期</td>
<td class="tr">{dcalendar('post[fromtime]', $fromtime)} <span id="dpostfromtime" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">到期日期</td>
<td class="tr">{dcalendar('post[totime]', $totime)} 不设置表示永久有效</td>
</tr>

<!-- 文件上传 -->
<tr>
<td class="tl"><span class="f_red">*</span> 文件地址</td>
<td class="tr"><div style="float:left;"><input name="post[fileurl]" id="fileurl" type="text" size="60" 

value="{$fileurl}"/>&nbsp;&nbsp;</div><div style="width:34px;height:20px;float:left;"><span 

id="spanButtonPlaceHolder"></span></div><table cellspacing="0" style="display:none;">
<tr>
	<td>Files Queued:</td>
	<td id="tdFilesQueued"></td>
</tr>			
<tr>
	<td>Files Uploaded:</td>
	<td id="tdFilesUploaded"></td>
</tr>			
<tr>
	<td>Errors:</td>
	<td id="tdErrors"></td>
</tr>
<tr>
	<td>Current Speed:</td>
	<td id="tdCurrentSpeed"></td>
</tr>			
<tr>
	<td>Average Speed:</td>
	<td id="tdAverageSpeed"></td>
</tr>			
<tr>
	<td>Moving Average Speed:</td>
	<td id="tdMovingAverageSpeed"></td>
</tr>			
<tr>
	<td>Time Remaining</td>
	<td id="tdTimeRemaining"></td>
</tr>			
<tr>
	<td>Time Elapsed</td>
	<td id="tdTimeElapsed"></td>
</tr>
<tr>
	<td>Size Uploaded</td>
	<td id="tdSizeUploaded"></td>
</tr>			
<tr>
	<td>Progress Event Count</td>
	<td id="tdProgressEventCount"></td>
</tr>	
</table><div style="float:left;">&nbsp;&nbsp;<span onclick="if(Dd('fileurl').value) window.open(Dd('fileurl').value);" 

class="jt">[预览]</span>&nbsp;&nbsp;<span onclick="Dd('fileurl').value='';" class="jt">[删除]</span>&nbsp;&nbsp; 
<span class="f_gray">进度：<span id="tdPercentUploaded">0%</span></span> <span id="dfileurl" class="f_red"></span></div>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/swfupload.speed.js"></script>
<script type="text/javascript" src="{$MODULE[1][linkurl]}file/swfupload/handlers_down.js"></script>
<script type="text/javascript">
	var swfu;
	/* window.onload = function() { */
		var settings = {
			flash_url : "{$MODULE[1][linkurl]}file/swfupload/swfupload.swf",
			upload_url: "{$MODULE[1][linkurl]}upload.php",
			post_params: {"from": "file", "width": "100", "height": "100", "swf_userid": "<?php echo 

$_userid;?>", "swf_username": "<?php echo $_username;?>", "swf_groupid": "<?php echo $_groupid;?>", "swf_auth": "<?php echo 

md5($_userid.$_username.$_groupid.DT_KEY.$DT_IP);?>", "swfupload": "1"},
			file_size_limit : "1000 MB",
			file_types : "*.*",
			/*file_types : "*.<?php echo str_replace('|', ';*.', $MOD['upload']);?>",*/
			/* file_upload_limit : 100, */
			file_upload_limit : 10,
			file_queue_limit : 0,

			debug: false,

			button_image_url: "{$MODULE[1][linkurl]}file/swfupload/upload2.png",
			button_width: "34",
			button_height: "20",
			button_placeholder_id: "spanButtonPlaceHolder",
			
			moving_average_history_size: 40,
			
			file_queued_handler : fileQueued,
			file_dialog_complete_handler: fileDialogComplete,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,
			
			custom_settings : {
				tdFilesQueued : document.getElementById("tdFilesQueued"),
				tdFilesUploaded : document.getElementById("tdFilesUploaded"),
				tdErrors : document.getElementById("tdErrors"),
				tdCurrentSpeed : document.getElementById("tdCurrentSpeed"),
				tdAverageSpeed : document.getElementById("tdAverageSpeed"),
				tdMovingAverageSpeed : document.getElementById("tdMovingAverageSpeed"),
				tdTimeRemaining : document.getElementById("tdTimeRemaining"),
				tdTimeElapsed : document.getElementById("tdTimeElapsed"),
				tdPercentUploaded : document.getElementById("tdPercentUploaded"),
				tdSizeUploaded : document.getElementById("tdSizeUploaded"),
				tdProgressEventCount : document.getElementById("tdProgressEventCount")
			}
		};
		swfu = new SWFUpload(settings);
	 /* }; */
</script></td>
</tr>
<!--END: 文件上传-->

<tr>
<td class="tl">合同介绍</td>
<td class="tr"><textarea name="post[content]" id="content" class="dsn">{$content}</textarea>
{deditor($moduleid, 'content', $group_editor, '98%', 300)}<span id="dcontent" class="f_red"></span>
</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 添加时间</td>
<td class="tr"><input type="text" size="21" name="post[addtime]" id="addtime" value="{$addtime}"/> <span class="f_gray">请

保持时间格式</span> <span id="daddtime" class="f_red"></span></td>
</tr>
{if $li=='rej'}
<tr>
<td class="tl"> 拒绝原因</td>
<td class="tr">{$notes}</td>
</tr>
{/if}
<tr>
<td class="tl">&nbsp;</td>
<td class="tr" height="50"><input type="submit" name="submit" value=" 修 改 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input 

type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
</tr>
</table>
</form>
{load('clear.js')}
<script type="text/javascript">s('content');m('s{$status}');</script>

{elseif $action=="down"}
<form action="content.php">
<input type="hidden" name="status" value="{$status}"/>
<div class="tt">
&nbsp;<input type="text" size="60" name="kw" value="合同名称搜索" onfocus="if(this.value=='合同名称搜索')this.value=''" 

onblur="if(this.value=='')this.value='合同名称搜索'" title="关键词"/> &nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>&nbsp;
<input type="button" value=" 重 置 " class="btn" onclick="window.location='content.php?action=down';"/>
</div>
</form>
<div class="ls">
<table cellspacing="0" cellpadding="0" class="tb">
<tr>
<th>合同ID</th>
<th>合同名称</th>
<th>交易公司</th>
<th>启用日期</th>
<th>到期日期</th>
<th width="40">下载</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td>{$v[contentID]}</td>
<td>{$v[title]}{if $v[status]==1 && $v[note]} <a href="javascript:" onclick="alert('{$v[note]}');"><img src="image/why.gif" 

title="未通过原因"/></a>{/if}</td>
<td>{$v[authority]}&nbsp;</td>
<td class="f_gray">{$v[fromdate]}</td>
<td class="f_gray">{$v[todate]}</td>

<!--文件下载-->
<td><a href="javascript:namesubss('{$v[fileurl]}');">下载</a></td>
<!--END: 文件下载-->

<!--<td><a href="content.php?action=edit&itemid={$v[itemid]}"><img width="16" height="16" src="image/edit.png" title="修改" 

alt=""/></a></td>-->
</tr>
{/loop}
</table>
</div>
<div class="pages">{$pages}</div>
<script type="text/javascript">s('content');m('down');</script>

{elseif $action=='ctlist'}
<form action="content.php?action=ctlist">
<input type="hidden" name="status" value="{$status}"/>
<div class="tt">
&nbsp;<input type="text" size="60" name="kw" value="合同名称搜索" onfocus="if(this.value=='合同名称搜索')this.value=''" 

onblur="if(this.value=='')this.value='合同名称搜索'" title="关键词"/> &nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>&nbsp;
<input type="button" value=" 重 置 " class="btn" onclick="window.location='content.php?action=ctlist';"/>
</div>
</form>
<div class="ls">
<table cellspacing="0" cellpadding="0" class="tb">
<tr>
<th>合同ID</th>
<th>合同名称</th>
<th>交易公司</th>
<th>启用日期</th>
<th>到期日期</th>
<th>总金额</th>
<th width="40">下载</th>
<th width="40">修改</th>
<th width="40">删除</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td>{$v[contentID]}</td>
<td>{$v[title]}{if $v[status]==1 && $v[note]} <a href="javascript:" onclick="alert('{$v[note]}');"><img src="image/why.gif" 

title="未通过原因"/></a>{/if}</td>
<td>{$v[authority]}</td>
<td class="f_gray">{$v[fromdate]}</td>
<td class="f_gray">{$v[todate]}</td>
<td class="f_gray">{$v[amount]}</td>

<!--文件下载-->
<td><a href="javascript:namesubss('{$v[fileurl]}');">下载</a></td>
<!--END: 文件下载-->

<td><a href="content.php?action=edit&li=read&itemid={$v[itemid]}"><img width="16" height="16" src="image/edit.png" title="

修改" alt=""/></a></td>
<td><a href="content.php?action=delete&itemid={$v[itemid]}" onclick="if(!confirm('确定要删除吗？此操作将不可撤销')) return 

false;"><img width="16" height="16" src="image/delete.png" title="删除" alt=""/></a></td>
</tr>
{/loop}
</table>
</div>
{if $MG[honor_limit]}
<div class="limit">总共可收 <span class="f_b f_red">{$MG[honor_limit]}</span> 条&nbsp;&nbsp;&nbsp;当前已收 <span 

class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;还可以收 <span class="f_b f_blue">{$limit_free}</span> 条</div>
{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('content');m('ctlist');</script>

{elseif $action=='paylist'}
<form action="content.php">
<input type="hidden" name="status" value="{$status}"/>
<div class="tt">
&nbsp;<input type="text" size="60" name="kw" value="合同名称搜索" onfocus="if(this.value=='合同名称搜索')this.value=''" 

onblur="if(this.value=='')this.value='合同名称搜索'" title="关键词"/> &nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>&nbsp;
<input type="button" value=" 重 置 " class="btn" onclick="window.location='content.php?action=paylist';"/>
</div>
</form>
<div class="ls">
<table cellspacing="0" cellpadding="0" class="tb">
<tr>
<th>合同ID</th>
<th>合同名称</th>
<th>交易公司</th>
<th>启用日期</th>
<th>到期日期</th>
<th>总金额</th>
<th>已支付</th>
<th width="40">删除</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td>{$v[contentID]}</td>
<td>{$v[title]}{if $v[status]==1 && $v[note]} <a href="javascript:" onclick="alert('{$v[note]}');"><img src="image/why.gif" 

title="未通过原因"/></a>{/if}</td>
<td>{$v[authority]}</td>
<td class="f_gray">{$v[fromdate]}</td>
<td class="f_gray">{$v[todate]}</td>
<td class="f_gray">{$v[amount]}</td>
<td class="f_gray">
<a href="content.php?action=payamtlist&lst=paylist&itemid={$v[itemid]}">{$v[payamt]}</a>
{if $v[payamt] >= $v[amount]}
<input type="button" value=" 完成支付 " class="btn" onclick="window.location='content.php?action=paylist&orderNo={$v[contentID]}';"/>
{/if}
</td>
<td><a href="content.php?action=delete&itemid={$v[itemid]}" onclick="if(!confirm('确定要删除吗？此操作将不可撤销')) return 

false;"><img width="16" height="16" src="image/delete.png" title="删除" alt=""/></a></td>
</tr>
{/loop}
</table>
</div>
{if $MG[honor_limit]}
<div class="limit">总共可收 <span class="f_b f_red">{$MG[honor_limit]}</span> 条&nbsp;&nbsp;&nbsp;当前已收 <span 

class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;还可以收 <span class="f_b f_blue">{$limit_free}</span> 条</div>
{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('content');m('paylist');</script>

{elseif $action=='payamtlist' && $lstmod == 'pay'}
{if $orderNo != ''}
<iframe name="neepage" marginwidth="0" marginheight="0" src="{DT_PATH}chinaofbank/index.php" width="100%" height="500" 

frameborder="0"></iframe>
{/if}
<script type="text/javascript">s('content');m('{$lst}');</script>

{elseif $action=='payamtlist' && $lstmod == 'resp'}
{if $errormsg != ''}
<div>
	<span class="f_red">{$errormsg}<br/>{if $paymsgs != ''}{$paymsgs}<br/>{/if}</span>
</div>
{else}

<table cellpadding="6" cellspacing="1" class="tb">
<tr>
<td></td>
<td class="tr"><span style="font-size:18px; font-weight:bolder;">支付成功</span></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 订单号</td>
<td class="tr">{$orderNo}</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 订单金额</td>
<td class="tr">{$tranAmount}</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 订单时间</td>
<td class="tr">{$tranTime}</td>
</tr>
<tr>
<td></td>
<td class="tr"><input type="button" value=" 确 定 " class="btn" onclicl="window.location='{DT_PATH}

member/content.php';"/>&nbsp;&nbsp;&nbsp;<input type="button" value=" 关 闭 " class="btn" 

onclicl="window.location='{DT_PATH}member/';"/></td>
</tr>
</table>
{/if}
<script type="text/javascript">s('content');m('{$lst}');</script>

{elseif $action=='payamtlist'}
<form action="content.php?action=payamtlist">
<input type="hidden" name="status" value="{$status}"/>
<div class="tt">
&nbsp;
<!--
<input type="text" size="60" name="kw" value="合同名称搜索" onfocus="if(this.value=='合同名称搜索')this.value=''" onblur="if(this.value=='')this.value='合同名称搜索'" title="关键词"/> &nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>&nbsp;
<input type="button" value=" 重 置 " class="btn" onclick="window.location='content.php?action=payamtlist';"/>
-->
</div>
</form>
<div class="ls">
<table cellspacing="0" cellpadding="0" class="tb">
<tr>
<th>合同ID</th>
<th>合同名称</th>
<th>交易公司</th>
<th>支付金额</th>
<th>支付日期</th>
<th>支付状态</th>
</tr>
{if $listrs == '0'}
<tr>
<td colspan="5" style="text-align:center;" class="f_gray">无</td>
</tr>
{else}
{loop $listrs $ks $vs}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td>{$vs[contentID]}</td>
<td>{$vs[title]}</td>
<td>{$vs[authority]}</td>
<td class="f_gray">{$vs[payamt]}</td>
<td class="f_gray">{$vs[addtime]}</td>
<td>
{if $vs[status] == '10'}
过期失效
{elseif $vs[status] == 'T3'}
<a href="http://www.boc.cn" target="_blank">支付故障</a>
{elseif $vs[status] == 'T2'}
<a href="http://www.boc.cn" target="_blank">支付失败</a>
{elseif $vs[status] == 'T1'}
支付成功
{elseif $vs[status] == '5'}
已取消支付
{elseif $vs[status] == '1'}
确认支付
{elseif $vs[status] == '0'}
<a href="http://www.boc.cn" target="_blank">未确认</a>
{/if}
</td>
</tr>
{/loop}
{/if}
</table>
</div>
{if $lst == 's3'}
<table cellspacing="0" cellpadding="0" class="tb">
<tr>
<td style="text-align:right;padding-right:50px;">
<br/>
{if $listrs != '0'}
<input type="button" value=" 支 付 " class="btn" onclick="window.location='content.php?action=payamtlist&lst=s3&lstmod=pay&comp={$listrs[0]['authorlist']}&orderNo={$listrs[0]['contidlist']}';"/>&nbsp;&nbsp;&nbsp;
{/if}
</td>
</tr>
</table>
{/if}
{if $MG[honor_limit]}
<div class="limit">总共可收 <span class="f_b f_red">{$MG[honor_limit]}</span> 条&nbsp;&nbsp;&nbsp;当前已收 <span 

class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;还可以收 <span class="f_b f_blue">{$limit_free}</span> 条</div>
{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('content');m('{$lst}');</script>

{elseif $status=="1" || $status=="2"}
<form action="content.php">
<input type="hidden" name="status" value="{$status}"/>
<div class="tt">
&nbsp;<input type="text" size="60" name="kw" value="合同名称搜索" onfocus="if(this.value=='合同名称搜索')this.value=''" 

onblur="if(this.value=='')this.value='合同名称搜索'" title="关键词"/> &nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>&nbsp;
<input type="button" value=" 重 置 " class="btn" onclick="window.location='content.php?status={$status}';"/>
</div>
</form>
<div class="ls">
<table cellspacing="0" cellpadding="0" class="tb">
<tr>
<th>合同ID</th>
<th>合同名称</th>
<th>交易公司</th>
<th>启用日期</th>
<th>到期日期</th>
<th>总金额</th>
{if $status=="1"}<th width="40">下载</th>{/if}
<th width="40">修改</th>
<th width="40">删除</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td>{$v[contentID]}</td>
<td>{$v[title]}{if $v[status]==1 && $v[note]} <a href="javascript:" onclick="alert('{$v[note]}');"><img src="image/why.gif" 

title="未通过原因"/></a>{/if}</td>
<td>{$v[authority]}</td>
<td class="f_gray">{$v[fromdate]}</td>
<td class="f_gray">{$v[todate]}</td>
<td class="f_gray">{$v[amount]}</td>
{if $status=="1"}
<!--文件下载-->
<td><a href="javascript:namesubss('{$v[fileurl2]}');">下载</a></td>
<!--END: 文件下载-->
{/if}
<td><a href="content.php?action=edit&itemid={$v[itemid]}{if $status=='1'}&li=rej{/if}"><img width="16" height="16" 

src="image/edit.png" title="修改" alt=""/></a></td>
<td><a href="content.php?action=delete&itemid={$v[itemid]}" onclick="if(!confirm('确定要删除吗？此操作将不可撤销')) return 

false;"><img width="16" height="16" src="image/delete.png" title="删除" alt=""/></a></td>
</tr>
{/loop}
</table>
</div>
{if $MG[honor_limit]}
<div class="limit">总共可发 <span class="f_b f_red">{$MG[honor_limit]}</span> 条&nbsp;&nbsp;&nbsp;当前已发 <span 

class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;还可以发 <span class="f_b f_blue">{$limit_free}</span> 条</div>
{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('content');m('s{$status}');</script>

{elseif $action=='finish'}
<form action="content.php?action=finish">
<input type="hidden" name="status" value="{$status}"/>
<div class="tt">
&nbsp;<input type="text" size="60" name="kw" value="合同名称搜索" onfocus="if(this.value=='合同名称搜索')this.value=''" 

onblur="if(this.value=='')this.value='合同名称搜索'" title="关键词"/> &nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>&nbsp;
<input type="button" value=" 重 置 " class="btn" onclick="window.location='content.php?action=finish';"/>
</div>
</form>
<div class="ls">
<table cellspacing="0" cellpadding="0" class="tb">
<tr>
<th>合同ID</th>
<th>合同名称</th>
<th>交易公司</th>
<th>启用日期</th>
<th>到期日期</th>
<th>总金额</th>
<th>支付状态</th>
<th width="40">删除</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td>{$v[contentID]}</td>
<td>{$v[title]}{if $v[status]==1 && $v[note]} <a href="javascript:" onclick="alert('{$v[note]}');"><img src="image/why.gif" 

title="未通过原因"/></a>{/if}</td>
<td>{$v[authority]}</td>
<td class="f_gray">{$v[fromdate]}</td>
<td class="f_gray">{$v[todate]}</td>
<td class="f_gray">{$v[amount]}</td>
<td class="f_gray"><a href="content.php?action=payamtlist&lst=finish&itemid={$v[itemid]}">{$v[amount]}</a></td>
<td><a href="content.php?action=delete&itemid={$v[itemid]}" onclick="if(!confirm('确定要删除吗？此操作将不可撤销')) return 

false;"><img width="16" height="16" src="image/delete.png" title="删除" alt=""/></a></td>
</tr>
{/loop}
</table>
</div>
{if $MG[honor_limit]}
<div class="limit">总共可发 <span class="f_b f_red">{$MG[honor_limit]}</span> 条&nbsp;&nbsp;&nbsp;当前已发 <span 

class="f_b">*</span> 条&nbsp;&nbsp;&nbsp;还可以发 <span class="f_b f_blue">*</span> 条</div>
{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('content');m('finish');</script>

{else}
<form action="content.php">
<input type="hidden" name="status" value="{$status}"/>
<div class="tt">
&nbsp;<input type="text" size="60" name="kw" value="合同名称搜索" onfocus="if(this.value=='合同名称搜索')this.value=''" 

onblur="if(this.value=='')this.value='合同名称搜索'"  title="关键词"/> &nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>&nbsp;
<input type="button" value=" 重 置 " class="btn" onclick="window.location='content.php?status={$status}';"/>
</div>
</form>
<div class="ls">
<table cellspacing="0" cellpadding="0" class="tb">
<tr>
<th>合同ID</th>
<th>合同名称</th>
<th>交易公司</th>
<th>启用日期</th>
<th>到期日期</th>
<th>总金额</th>
<th>支付状态</th>
<th width="40">删除</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td>{$v[contentID]}</td>
<td>{$v[title]}{if $v[status]==1 && $v[note]} <a href="javascript:" onclick="alert('{$v[note]}');"><img src="image/why.gif" 

title="未通过原因"/></a>{/if}</td>
<td>{$v[authority]}</td>
<td class="f_gray">{$v[fromdate]}</td>
<td class="f_gray">{$v[todate]}</td>
<td class="f_gray">{$v[amount]}</td>
<td class="f_gray">
{if $v[payamt]>=$v[amount]}
<a href="content.php?action=payamtlist&lst=s{$status}&itemid={$v[itemid]}">完成支付</a>
{else}
<input type="button" value="查 看" style="width:40px; height:20px; font-size:11px;" onclick="window.location='content.php?action=payamtlist&lst=s{$status}&itemid={$v[itemid]}';"/>&nbsp;&nbsp;<input type="button" value="支 付" style="width:40px; height:20px; font-size:11px;" onclick="window.location='content.php?action=payamtlist&lst=s3&lstmod=pay&comp={$v[authority]}&orderNo={$v[contentID]}';"/>
{/if}
</td>
<td><a href="content.php?action=delete&itemid={$v[itemid]}" onclick="if(!confirm('确定要删除吗？此操作将不可撤销')) return 

false;"><img width="16" height="16" src="image/delete.png" title="删除" alt=""/></a></td>
</tr>
{/loop}
</table>
</div>
{if $MG[honor_limit]}
<div class="limit">总共可发 <span class="f_b f_red">{$MG[honor_limit]}</span> 条&nbsp;&nbsp;&nbsp;当前已发 <span 

class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;还可以发 <span class="f_b f_blue">{$limit_free}</span> 条</div>
{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('content');m('s{$status}');</script>
{/if}

{if $action=='add' || $action=='edit'}
<script type="text/javascript">
function check() {
	if(Dd('title').value == '') {
		Dmsg('请填写合同名称', 'title');
		return false;
	}
	if(Dd('authority').value == '') {
		Dmsg('请填写交易公司', 'authority');
		return false;
	}
	if(Dd('postfromtime').value == '') {
		Dmsg('请选择启用日期', 'postfromtime');
		return false;
	}
	if(Dd('amount').value == '') {
		Dmsg('请填写金额', 'amount');
		return false;
	}

	if(Dd('postfromtime').value.replace(/-/g, '') > {$today}) {
		Dmsg('启用日期尚未开始', 'postfromtime');
		return false;
	}
	f = 'fileurl';
	l = Dd(f).value.length;
	if(l < 10) {
		Dmsg('请填写文件地址', f);
		return false;
	}
	return true;
}

function check2() {
	if(Dd('postfromtime').value == '') {
		Dmsg('请选择启用日期', 'postfromtime');
		return false;
	}
	return true;

}

</script>
{/if}
{template 'footer', 'member'}